package cn.charmaine.system.mapper;

import cn.charmaine.system.domain.Role;
import cn.charmaine.basic.base.mapper.IBaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xmy
 * @since 2022-07-14
 */
public interface RoleMapper extends IBaseMapper<Role> {

    void deleteRoleAndMenuByRoleId(Long id);

    void deleteRoleAndPermissionByRoleId(Long id);

    void insertRoleAndMenu(@Param("id") Long id, @Param("menus") List<Long> menus);

    void insertRoleAndPermission(@Param("id") Long id, @Param("permissions") List<Long> permissions);
}
